<?php
class Home_Model extends General_Model {

	function getListCategories() {
//		$query = $this->db->get ( 'categories' );
		$query=$this->db->query("SELECT ci_categories.*,ci_gallery.file_name FROM `ci_categories`
							LEFT JOIN ci_gallery ON ci_gallery.id=ci_categories.img_id");
		$categories = $query->result ();
		return $categories;
	}

	function getCompanyDetail() {
		$query = $this->db->get ( 'about' );
		$about = $query->row ();
		return $about;
	}
	function getLogo() {
		$this->db->where ( 'type', 'Logo' );
		$this->db->where ( 'active', '1' );
		$query = $this->db->get ( 'gallery' );
		$list = $query->row ();
		return $list;
	}
	function getBanner() {
		$this->db->where ( 'type', 'Banner' );
		$this->db->where ( 'active', '1' );
		$query = $this->db->get ( 'gallery' );
		$list = $query->result ();
		return $list;
	}
}